package com.genokon.uid.consumer.service;

import com.baidu.fsg.uid.UidGenerator;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author by baichaoda
 * @date 2020/7/29 17:15
 */
@Service
public class UidGeneratorService {
    @Resource(name = "cachedUidGenerator")
    private UidGenerator uidGenerator;

    public long getUid(){
        return uidGenerator.getUID();
    }

    public String parseUid(long uid){
        return uidGenerator.parseUID(uid);
    }
}
